Method and apparatus for fast and random access of variable sized records stored in a partitioned format

ABSTRACT

A method and apparatus for storing and accessing a preferred roaming list formed of variable size system records each of which includes a system identification field, a network identification included field, a preferred_negative field, a geographical region indicator field, and an acquisition parameter information field. Each of the system records optionally includes a network identification field, a priority field, and a roaming indicator field. The network identification, priority and roaming indicator fields from the records are stored in a first array; the system identification and geographical region indicator fields are stored in a second array; the first bit of the network identification included and the preferred_negative fields are stored in a third array; the second bit of the network identification included fields from the records are stored in a fourth array; and the acquisition parameter information fields are stored in a fifth array. A first index value corresponding to a selected record to be accessed is received, and entries in the third array are evaluated in response to the first index value in order to access the first bit of the network identification included field and the preferred_negative field associated with the selected record and to determine a second index value for locating any network identification, priority or roaming indicator field associated with the selected record in the first array. Any network identification, priority or roaming indicator field associated with the selected record is then accessed in the first array using the second index value, and the system identification field and the geographical region indicator field associated with the selected record are accessed from the second array using the first index value.

BACKGROUND OF THE INVENTION

[0001] I. Field of the Invention

[0002] The present invention is directed generally to mobile telephonesystems. More particularly, the present invention relates to systems andmethods that permit a mobile telephone user to roam outside of theuser's home service area. Still more particularly, the present inventionrelates to systems and methods for storing and quickly accessing recordsin a Preferred Roaming List (PRL) from memory in a mobile telephone.

[0003] II. Description of the Related Art

[0004] In typical mobile telephone systems, when a mobile telephone usermoves outside the user's home area (also known as roaming), the user'stelephone is often switched from the home system to an alternate systemprovider so that service can continue for the user. In order to switchthe user to an alternate system provider, the mobile telephone willtypically access system records in the PRL stored in the memory of themobile phone. Based on the system records stored in the PRL, the mobilephone will typically select an alternative system service provider thatwill be used to continue service for the user and, based on thisselection and the associated information stored in the PRL systemrecords, the mobile phone will automatically access the selected serviceprovider on behalf of the user.

[0005] The Telephone Industry Association/Electronics IndustryAssociation (also known as TIA/EIA) has recently published a newstandard that describes a data format to be used for system tablerecords in a PRL. See Interim Standard entitled “Over-The-Air ServiceProgramming Of Mobile Stations in Spread Spectrum Systems”, (hereinafter“the IS-683-A Standard”), the contents of which is hereby incorporatedby reference in its entirety. The IS-683-A Standard provides that eachsystem record in the PRL will have the following eight fields:

[0006] 1. SID field: a 15 bit field that includes a numerical value thatis the System Identification number of the system associated with thesystem record;

[0007] 2. NID_INCL field: a 2 bit field, the least significant bit ofthis field indicates whether there is a Network Identification (NID)number associated with the system record and stored in the NID fielddescribed below; the most significant bit of this record is used tospecify an assumed value for the NID if no value is stored in the NIDfield described below; the value 11 is a reserved value;

[0008] 3. NID field a 16 bit field that contains a numerical value thatis the Network Identification number of the system associated with thesystem record;

[0009] 4. PREF_NEG field: a 1 bit field indicating whether the systemassociated with the system record is a preferred system or a negativesystem.

[0010] 5. GEO field: a 1 bit field that indicates whether the systemassociated with the system record is within the geographic region of theprevious system record in the PRL (if GEO=1) or, alternatively, whetherthe system is in a new geographic region (if GEO=0);

[0011] 6. PRI field: a 1 bit field that indicates whether the currentsystem record has a higher priority than that of the next system recordin the PRL. This field is omitted from the system record if the PREF_NEGfield indicates that the system associated with system record is anegative system;

[0012] 7. ACQ_INDEX field: a 9 bit field that contains an index to theacquisition parameters required for the mobile phone to access thesystem associated with the system record;

[0013] 8. ROAM_IND field: an 8 bit field that indicates the roamingstatus of the associated system record; this field is omitted from thesystem record if the PREF_NEG field indicates that the system associatedwith system record is a negative system.

[0014] In current mobile telephones, the PRL is stored in the mobilephone's non-volatile memory and, during system initialization, theentire PRL is moved and stored in the unit's RAM in a single bit-packedarray for later access during a System Selection and Preferred Roamingoperation. One purpose of using the bit-packed form is to save memoryspace. Unfortunately, since each record in the PRL is variably-sized(this occurs because, as described above, some or all of the NID, PRIand ROAM_IND fields can be omitted from a given system record), thestarting position in RAM of each system record in the PRL is uncertain.This uncertainty makes accessing a given system record difficult andtime-consuming in current systems. More particularly, as a result of theuncertainty of the starting position in RAM of each system record in thePRL, current record accessing software must sequentially step througheach system record in the System Table stored in RAM starting with thefirst record in the table in order to access a record that is locatedsomewhere within the table. One other deficiency of current recordaccessing systems is that they do not permit the “backtracking” ofrecords within the PRL stored in RAM. For example, if the systempreviously accessed the 164th record in the PRL stored in RAM and,thereafter, the system wished to access the 161st record, the accessingsoftware would be unable to simply go back three records in the tableand would instead be forced to again sequentially step through eachsystem record in the System Table stored in RAM starting with the firstrecord in the table in order to access the 161st record.

[0015] These problems and deficiencies are recognized and solved by thepresent invention in the manner described below.

SUMMARY OF THE INVENTION

[0016] The present invention uses a novel partitioned memory format forstoring the PRL in RAM which facilitates that rapid storing andaccessing of system records from the PRL. The partitioned memory formatuses five separate arrays to store the various fields of the systemrecords in the PRL. By applying an index value to these arrays,accessing software can rapidly access one or more fields of a particularsystem record in the PRL without having to sequentially step through allfields in each system record starting with the first record until thedesired record is reached. This aspect of the invention not only allowsthe mobile phone to access all fields of a given system record rapidlybut, in situations where the mobile phone wishes to access only a singlefield in a system record (e.g., the SID field), the present inventionpermits for the rapid accessing of this information in a manner whichdoes not require the sequential accessing of other information in thePRL. In addition, the accessing system of the present invention allowsfor the backtracking of records in the PRL, which is not possible withthe current systems as described above.

[0017] The invention also uses a novel system for reading the PRL fromnon-volatile memory and storing the PRL in RAM during systeminitialization. This novel system substantially requires no additionalaccesses to the non-volatile memory that are necessary to move the PRLfrom the non-volatile memory to RAM by organizing the system records “inplace” in RAM after they have initially been moved from the non-volatilememory to RAM. Since accesses to non-volatile memory are slow, thisaspect of the invention functions to minimize the time required duringsystem initialization to re-arrange the PRL in the RAM and store thedata in the partitioned format.

[0018] In accordance with one particular aspect, the present inventionis directed to a method and apparatus for storing and accessing apreferred roaming list formed of variable size system records each ofwhich includes a system identification field, a network identificationincluded field, a preferred_negative field, a geographical regionindicator field, and an acquisition parameter information field. Each ofthe system records optionally includes a network identification field, apriority field, and a roaming indicator field. The networkidentification, priority and roaming indicator fields from the recordsare stored in a first array; the system identification and geographicalregion indicator fields are stored in a second array; the first bit ofthe network identification included and the preferred_negative fieldsare stored in a third array; the second bit of the networkidentification included fields from the records are stored in a fourtharray; and the acquisition parameter information fields are stored in afifth array. A first index value corresponding to a selected record tobe accessed is received, and entries in the third array are evaluated inresponse to the first index value in order to access the first bit ofthe network identification included field and the preferred_negativefield associated with the selected record and to determine a secondindex value for locating any network identification, priority or roamingindicator field associated with the selected record in the first array.Any network identification, priority or roaming indicator fieldsassociated with the selected record are then accessed in the first arrayusing the second index value, and the system identification field andthe geographical region indicator field associated with the selectedrecord are accessed from the second array using the first index value.Other fields associated with the selected record are also accessed fromthe remaining arrays using the first index value.

[0019] In accordance with a further aspect, the present invention isdirected to a method and apparatus for quickly retrieving systemidentification field information from a preferred roaming list. In thisembodiment, the variable sized system records are stored in memory usingthe five arrays described in the paragraph above. However, in thisfurther embodiment, a first index value corresponding to a selected oneof the plurality of system records to be accessed is received and, inresponse to the first index value, the system identification fieldassociated with the selected system record and stored in the secondarray is quickly accessed.

BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The features, objects and advantages of the present inventionwill become more apparent from the detailed description set forth belowwhen taken in conjunction with the drawings in which like referencecharacters identify corresponding items throughout and wherein:

[0021]FIG. 1 is a block diagram of the data format used for storing thefirst bit of the network identification included and thepreferred_negative fields from system records in the PRL in an array, inaccordance with a preferred embodiment of the present invention.

[0022]FIG. 2 is a block diagram of the data format used for storing thesecond bit of the network identification included fields from systemrecords in the PRL in an array, in accordance with a preferredembodiment of the present invention.

[0023]FIG. 3 is a flow diagram of a system for accessing system recordsin the PRL in response to an index value, in accordance with a preferredembodiment of the present invention.

[0024]FIGS. 4, 4A, 4B and 4C are a flow diagram of a system for storingPRL system records read from non-volatile memory in a RAM in apartitioned format, in accordance with a preferred embodiment of thepresent invention.

[0025]FIG. 5 is a block diagram showing the components of a system forstoring and accessing system records in the PRL in response to an indexvalue, in accordance with a preferred embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0026] The present invention uses a partitioned memory format forstoring the PRL in RAM. In particular, five separate arrays are used inthe present invention to store the various fields of the system recordsin the PRL in the mobile phone's RAM. A first array (referred to as theSID_GEO array) is used to store the SID and GEO fields of the systemrecords in the PRL. Each entry in the SID_GEO array is formed of twoeight-bit words (or 16 bits total). The 15 least significant bits ineach entry in this array are used to store the SID field associated witha given system record, and the most significant bit in the entry is usedto store the GEO field associated with the system record. A 16 bit entrythat stores the SID and GEO fields corresponding to the first systemrecord in the PRL is stored as the first record in the SID_GEO array, a16 bit entry that stores the SID and GEO fields corresponding to thesecond system record in the PRL is stored as the second record in theSID_GEO array, and so on. The complete SID_GEO array will thus contain N16bit entries, each of which holds the SID and GEO fields correspondingto a particular system record in the PRL.

[0027] A second array (known as the NI_PR array) is used to store thefirst bit of the NID_INCL field and the PREF_NEG field of the systemrecords in the PRL. An illustration of a portion of the NI_PR array isshown in FIG. 1. Each entry in the NI_PR array is formed of a two bitrecord (these records may be grouped four at a time into eight bitwords). The first bit in each entry in this array is used to store thefirst bit of the NID_INCL field associated with a given system record(this bit is also referred to as the NI1_bit), and the second bit in theentry is used to store the PREF_NEG field associated with the systemrecord. The relative ordering of the two bits is not significant and maybe arbitrarily chosen. A 2 bit entry that stores the NI1_bit andPREF_NEG field corresponding to the first system record in the PRL isstored as the first record in the NI_PR array, a 2 bit entry that storesthe NI1_bit and PREF_NEG field corresponding to the second system recordin the PRL is stored as the second record in the NI_PR array, and so on.The complete NI_PR array will thus contain N 2-bit entries, each ofwhich holds the NI1_bit and PREF_NEG field corresponding to a particularsystem record in the PRL.

[0028] A third array (known as the NI2_BIT array) is used to store thesecond bit of the NID_INCL field of the system records in the PRL. Anillustration of a portion of the NI2_BIT array is shown in FIG. 2. Eachentry in the NI2_BIT array is formed of a one bit record (which may begrouped eight at a time into eight bit words). The single bit in eachentry in this array is used to store the second bit of the NID_INCLfield associated with a given system record (this bit is also referredto as the NI2_bit). A 1-bit entry that stores the NI2_bit correspondingto the first system record in the PRL is stored as the first record inthe NI 2_BIT array, a 1-bit entry that stores the NI2_bit correspondingto the second system record in the PRL is stored as the second record inthe NI_PR array, and so on. The complete NI 2_BIT array will thuscontain N 1-bit entries, each of which holds the NI2_bit correspondingto a particular system record in the PRL.

[0029] A fourth array (known as the ACQ_INDEX array) is used to storethe ACQ_INDEX fields of the system records in the PRL. Each entry in theACQ_INDEX array is formed of a 9-bit record that is stored in RAM inbit-packed form. Each 9-bit entry in this array is used to store theACQ_INDEX field associated with a given system record. A 9-bit entrythat stores the ACQ_INDEX corresponding to the first system record inthe PRL is stored as the first record in the ACQ_INDEX array, a 9-bitentry that stores the ACQ_INDEX corresponding to the second systemrecord in the PRL is stored as the second record in the ACQ_INDEX arrayin bit-packed format immediately adjacent to the first 9-bit entry, andso on. The complete ACQ_INDEX array will thus contain N 9-bit entries,each of which holds the ACQ_INDEX field corresponding to a particularsystem record in the PRL.

[0030] A fifth array (known as the MISC array) is used to store the NID,PRI and ROAM_IND fields of the system records in the PRL. As mentionedabove, the NID, PRI and ROAM_IND fields may not be included in eachsystem record. Thus, for some system records in the PRL, there may be noinformation corresponding to the NID, PRI and ROAM_IND fields in theMISC array. Each entry in the MISC array is formed of a variable sizedrecord that is sized to store only the NID, PRI and ROAM_IND fieldsassociated with a particular system record. Accordingly, if for aparticular system record the PRI and ROAM_IND fields are included butthe NID field is omitted, 9 bits (i.e., the collective size of the PRIand ROAM_IND fields) will be allocated in the MISC array for theparticular system record. Similarly, if for a particular system recordthe NID field is included but the PRI and ROAM_IND fields are omitted,16 bits (i.e., the size of the NID field) will be allocated in the MISCarray for the particular system record. Similarly, if for a particularsystem record the NID, PRI and ROAM_IND fields are all included, 25 bits(i.e., the collective size of the NID, PRI and ROAM_IND fields) will beallocated in the MISC array for the system record. If the NID, PRI andROAM_IND fields are all omitted for a given system record, no space willbe allocated in the MISC array for the system record. The NID, PRI andROAM_ND fields (where present) associated with each record in the PRLlist are stored sequentially in the MISC array in bit-packed form. Avariable sized entry (either 0 bits, 9 bits, 16 bits or 25 bits) thatstores any NID, PRI and ROAM_IND fields corresponding to the firstsystem record in the PRL is thus stored as the first record in the MISCarray, a variable sized entry (either 0 bits, 9 bits, 16 bits or 25bits) that stores any NID, PRI and ROAM_IND fields corresponding to thesecond system record in the PRL is stored as the second record in theMISC array in bit-packed format immediately adjacent to the firstvariable sized entry, and so on.

[0031] Referring now to FIG. 3, there is shown a flow diagram of asystem for rapidly accessing system records in the PRL in response to anindex value (M) using the SID_GEO, NI_PR, NI2_BIT, ACQ_INDEX and MISCarrays described above. The index value represents the location withinthe PRL of the system record to be accessed. Thus, for example, thefirst system record on the PRL will correspond to an index value of M=1,the second system record on the PRL will correspond to an index value ofM=2, and so on. The process begins at step 302, where the PRL from thenon-volatile memory in the phone is moved to the mobile's RAM and thenreformatted in a partitioned format as the SID_GEO, NI_PR, NI2_BIT,ACQ_INDEX and MISC arrays described above. As mentioned previously, thisstep is preferably performed during system initialization. A detaileddescription showing a preferred implementation of step 302 is shown inFIGS. 4, 4A, 4B and 4C and described below.

[0032] Referring still to FIG. 3, in step 304, the index value (M)corresponding to the location within the PRL of a system record to beaccessed is received by the accessing software. In step 306, the indexvalue M is applied to the NI_PR array in order to determine the NI1_bitand the PREF_NEG bit associated with the system record being accessed.In step 306, the value (M−1) is first multiplied by the size of eachrecord in the NI_PR array (i.e., two bits) and this quantity is thenadded to the starting address of the NI_PR array in RAM (ni_pr_startp)to find the starting address of the entry in the NI_PR arraycorresponding to the Mth record. Based on this starting address, theNI1_bit and the PREF_NEG bit corresponding to the desired system recordare easily accessed.

[0033] If the NI1_bit and the PREF_NEG bit indicate that there is eithera NID field and/or PRI and ROAM_IND fields associated with the desiredsystem record (step 308), then in step 309 the system sequentiallyevaluates each entry in the NI_PR array starting at the first entry andcontinuing until the M−1th entry in the array. During this process, acounter is first initialized to zero and thereafter, each entry in theNI_PR array (which will have one of the following values: 00, 01, 10, or11) up until the M−1th entry is sequentially applied to a look-up tablewhich uses the counter to maintain a running count of the number of bitsin the MISC array associated with the first M−1 entries in the NI_PRarray. More particularly, for each entry in the NI_PR array having thevalue 00 (indicating that the NID, PRI and ROAM_IND fields are notincluded for the record), the running counter will be incremented by 0bits; for each entry in the NI_PR array having the value 01 (indicatingthe PRI and ROAM_IND fields are included and the NID field is notincluded for the record), the running counter will be incremented by 9bits; for each entry in the NI_PR array having the value 10 (indicatingthe PRI and ROAM_IND fields are not included and the NID field isincluded for the record), the running counter will be incremented by 16bits; and for each entry in the NI_PR array having the value 11(indicating that the NID, PRI and ROAM_IND fields are all included forthe record), the running counter will be incremented by 25 bits. Afterall of the M−1th records in the NI_PR have been evaluated in thismanner, the final value of the running counter will correspond to thesecond index value referred to above. In step 310, the second indexvalue is added to the starting address of the MISC array in RAM(misc_startp) to find the starting address of the entry in the MISCarray corresponding to the Mth record. Based on this starting address,the information in any NID, PRI or ROAM_IND fields corresponding to thedesired system record are easily accessed.

[0034] Although in the embodiment of step 309 described above, eachrecord in the NI_PR array was individually applied to the look-up tablein sequential order to determine the final value of the running counter,it will be understood by those skilled in the art that multiple entriesfrom the NI_PR array could be grouped and collectively applied to alook-up table in order to expedite the process of calculating the secondindex value. For example, adjacent pairs of entries in the NI_PR arraycould be applied in 4-bit groups to a look-up table having 16 entries(instead of the 4 entry table described above) in order to expedite theprocess of calculating the second index value.

[0035] In step 312, the index value M is applied to the SID_GEO array inorder to determine the values of the SID and GEO field associated withthe system record being accessed. In step 312, the value (M−1) is firstmultiplied by the size of each record in the SID_GEO array (i.e., 16bits) and this quantity is then added to the starting address of theSID_GEO array in RAM (sid_geo_startp) to find the starting address ofthe entry in the SID_GEO array corresponding to the Mth record. Based onthis starting address, the SID and GEO fields corresponding to thedesired system record are easily accessed.

[0036] In step 314, the index value M is applied to the ACQ_INDEX arrayin order to determine the value of the ACQ_INDEX field associated withthe system record being accessed. In step 314, the value (M−1) is firstmultiplied by the size of each record in the ACQ_INDEX array (i.e., 9bits) and this quantity is then added to the starting address of theACQ_INDEX array in RAM (acq_index_startp) to find the starting addressof the entry in the ACQ_INDEX array corresponding to the Mth record.Based on this starting address, the ACQ_INDEX field corresponding to thedesired system record is easily accessed.

[0037] Finally, in step 316, the index value M is applied to the NI2_BITarray in order to determine the values of the NI 2_bit associated withthe system record being accessed. In step 316, the value (M−1) is firstmultiplied by the size of each record in the NI2_bit array (i.e., 1 bit)and this quantity is then added to the starting address of the NI2_BITarray in RAM (ni 2_bit_startp) to find the starting address of the entryin the NI 2_BIT array corresponding to the Mth record. Based on thisstarting address, the NI 2_bit corresponding to the desired systemrecord is easily accessed.

[0038] In a preferred embodiment of the present invention, where onlythe SID field corresponding to a particular system record is desired,steps 306, 308-310, 314 and 316 can be skipped from the method shown inFIG. 3. In this embodiment, after storage of the arrays in step 302 andreceipt of the index value (M) in step 304, the process proceedsdirectly to step 312 where the index value M is used as described aboveto access the SID field associated with the desired system record.

[0039] In a further embodiment which can be used after the system shownin FIG. 3 has been used to access the Mth record in the PRL, the presentinvention can be used to backtrack through the PRL to quickly access arecord that preceded the Mth record in the PRL. For example, if thesystem desired to access the (M−2) th record, it would simply use thearray starting addresses calculated during the accessing of the Mthrecord and then decrement those values accordingly in order to locatethe fields corresponding to the (M−2)th record in the five arraysdiscussed above.

[0040] Referring now to FIGS. 4, 4A, 4B and 4C, there is a flow diagramof a system for reformatting in partitioned format in RAM PRL systemrecords read from non-volatile memory. Initially, the PRL is read in itsentirety from the non-volatile memory into the RAM and the startingposition of the first record in RAM is located. Next, in step 402, afirst group of system records (e.g., 128 records or the total number ofrecords if less than 128 exist) are read from the RAM. The size of thegroup of records read in step 128 could be more or less than 128, but ispreferably a multiple of 8. In step 404, the SID and GEO fieldsassociated with the first group of system records are stored in a firstlocal buffer; the NI1_bits and the PREF_NEG fields associated with thefirst group of system records are stored in a second local buffer; theNI 2_bits associated with the first group of system records are storedin a third buffer; and ACQ_INDEX fields associated with the first groupof system records are stored in a fourth local buffer.

[0041] In step 406, the NID, PRI and ROAM_IND fields (i.e., the MISCarray information fields) associated with the first group of systemrecords are stored in bit-packed form in a first area in the RAM. Thestarting position in RAM of this first area used for storing thebit-packed MISC array information fields is stored as the misc_startpaddress. Next, in step 408, the end position in RAM of the NID, PRI andROAM_IND fields stored in step 406 is marked as the MISC_END position(i.e., the current end point of the MISC array in RAM). Next, in step410, all remaining un-read system records from the non-volatile memory(i.e., all system records other than those read into RAM in the firstgroup) are moved from their current position in RAM and stored in theRAM starting immediately after the MISC_END position.

[0042] In step 412, the end position in RAM of the unprocessed systemrecords stored in step 410 is marked, and the address of the first 16bit word following this position is stored as the value sid_geo_startp(this value will be used to store the starting position of the SID_GEOarray in RAM during the data partitioning process). In step 414, aportion of the SID_GEO array is next stored in the RAM by copying thecontents of the first local buffer into the RAM starting at thesid_geo_startp position.

[0043] In step 416, the bit following the end position in RAM of theSID_GEO information stored in step 414 is marked and stored as the valueni_pr_startp (this value will be used to store the starting position ofthe N_PR array in RAM during the data partitioning process). In step418, a portion of the NI_PR array is next stored in RAM by copying thecontents of the second local buffer into RAM starting at theni_pr_startp position.

[0044] In step 420, the bit following the end position in RAM of theNI_PR information stored in step 418 is marked and stored as the valueni2_bit_startp (this value will be used to store the starting positionof the NI 2_BIT array in RAM during the data partitioning process). Instep 422, a portion of the NI 2_BIT array is next stored in RAM bycopying the contents of the third local buffer into RAM starting at theni 2_bit_startp position.

[0045] In step 424, the bit following the end position in RAM of theNI2_BIT information stored in step 422 is marked and stored as the valueacq_index_startp (this value will be used to store the starting positionin RAM of the ACQ_INDEX array during the data partitioning process). Instep 426, a portion of the ACQ_INDEX array is next stored in RAM inbit-packed form by copying the contents of the fourth local buffer intoRAM starting at the acq_index_startp position.

[0046] If the total number of records is greater than the number ofrecords in the first group of system records, then following theprocessing of the first group of system records as described above,processing proceeds to step 428, where a further group of unprocessedsystem records (e.g., 128 records or the remaining number of records ifless than 128 exist) are read from the RAM starting at the MISC_ENDposition (i.e., the current end point of the MISC array in RAM). In step430, the SID and GEO fields associated with the further group of systemrecords are stored in the first local buffer; the NI1_bits and thePREF_NEG fields associated with the further group of system records arestored in the second local buffer; the NI 2_bits associated with thefurther group of system records are stored in the third buffer; and theACQ_INDEX fields associated with the further group of system records arestored in the fourth local buffer.

[0047] In step 432, the NID, PRI and ROAM_IND fields (i.e., the MISCarray information fields) associated with the further group of systemrecords are stored in RAM in bit-packed form starting at the MISC_ENDposition. Next, in step 434, the end position in RAM of the NID, PRI andROAM_IND fields stored in step 432 is marked and stored as the new valueof the MISC_END position (i.e., the current end point of the MISC arrayin RAM). Next, in step 436, all remaining unprocessed system records inRAM (i.e., all system records other than those read in the first groupor during any iterations of step 428) are read from the RAM and moved toa position in RAM starting immediately after the new value of theMISC_END position.

[0048] In step 438, the address of the first 16 bit word following theend position in RAM of the last bit of the unprocessed system recordsmoved in step 436 is marked and stored as the new value ofsid_geo_startp (i.e., the current starting position of the SID_GEO arrayin RAM). Next, in step 440, the SID_GEO records previously stored in RAMat the previous sid_geo_startp position (i.e., the value ofsid_geo_startp prior to updating of this address in step 438), are movedto RAM starting at a position corresponding to the new value ofsid_geo_startp. In step 444, a further portion of the SID_GEO array isstored in RAM by copying the contents of the first local buffer into RAMstarting immediately after the end of the records moved in step 440.

[0049] In step 444, the bit following the end position in RAM of theSID_GEO information stored in step 442 is marked and stored as the newvalue of ni_pr_startp (the current starting position of the NI_PR arrayin RAM). Next, in step 446, the NI_PR records previously stored in RAMat the previous ni_pr_startp position (i.e., the value of ni_pr_startpprior to updating of this address in step 444), are moved to RAMstarting at a position corresponding to the new value of ni_pr_startp.In step 448, a portion of the NI_PR array is next stored in the RAM bycopying the contents of the second local buffer into RAM startingimmediately after the end of the records moved in step 446.

[0050] In step 450, the bit following the end position in RAM of theNI_PR information stored in step 448 is marked and stored as the newvalue of ni2_bit_startp (the current starting position of the NI 2_BITarray in RAM). Next, in step 452, the NI 2_BIT records previously storedin RAM at the previous ni 2_bit_startp position (i.e., the value of ni2_bit_startp prior to updating of this address in step 450), are movedto RAM starting at a position corresponding to the new value of ni2_bit_startp. In step 452, a portion of the NI 2_BIT array is nextstored in RAM by copying the contents of the third local buffer into RAMstarting immediately after the end of the records moved in step 452.

[0051] In step 456, the bit following the end position in RAM of theNI2_BIT information stored in step 454 is marked and stored as the newvalue of acq_index_startp (the current starting position of theACQ_INDEX array in RAM). Next, in step 458, the ACQ_INDEX recordspreviously stored in RAM at the previous acq_index_startp position(i.e., the value of acq_index_startp prior to updating of this addressin step 456), are moved to RAM starting at a position corresponding tothe new value of acq_index_startp. In step 460, a portion of theACQ_INDEX array is next stored in the RAM by copying the contents of thefourth local buffer into RAM starting immediately after the end of therecords moved in step 458.

[0052] In step 462, the system tests to determine whether all the systemrecords in the PRL have been processed in accordance with the abovemethod; if not, the system proceeds to step 428 where the method isrepeated until all system records have been processed. Following the endof this process, the PRL will be stored in the RAM in partitioned formatin the five arrays described above.

[0053] The method described above in connection with FIGS. 4, 4A, 4B and4C is particularly advantageous because all data reformatting takesplace in the RAM occupied by the PRL. Little additional memory is neededto perform the reformatting operations, other than the memory needed tostore the geo_sid_startp, ni_pr_startp, ni2_bit_startp, andacq_index_startp values.

[0054] The data accessing and storage methods described above arepreferably implemented in software on the microprocessor controller 510(shown in FIG. 5) that is typically used for accessing the RAM 520 andnon-volatile memory 530 in a mobile phone. The illustration of the RAM520 in FIG. 5 depicts the format of the RAM following the end of thedata partitioning process shown in FIGS. 4, 4A, 4B and 4C.

[0055] The previous description of the preferred embodiments is providedto enable any person skilled in the art to make and use the presentinvention. The various modifications to these embodiments will bereadily apparent to those skilled in the art, and the generic principlesdefined herein may be applied to other embodiments without the use ofinventive faculty. Thus, the present invention is not intended to belimited to the methods and apparatuses shown herein but is to beaccorded the widest scope consistent with the claims set forth below.

What is claimed is:
 1. A method for storing and accessing a list storedin a random access memory, the list being formed of a plurality ofvariable size records, each of the records including a first fixed sizefield, each of the records optionally including a second field, whereinat least two of the variable size records in the list include the secondfield, comprising the steps of: (A) storing the second fields in theplurality of records in a first array, and storing the first fixed sizefields in the plurality of system records in a second array; (B)receiving a first index value corresponding to a selected one of theplurality of records to be accessed; (C) evaluating, in response to thefirst index value, entries in the second array in order to access thefirst fixed size field associated with the selected record and in orderto determine a second index value for locating any second fieldassociated with the selected record in the first array; and (D)accessing, in response to the second index value, any second fieldassociated with the selected record in the first array.
 2. The method ofclaim 1 , wherein step (C) includes the step of sequentially applyingentries in the second array to a lookup table in order to calculate thesecond index value.
 3. The method of claim 1 , wherein the first indexvalue received in step (B) corresponds to an offset between a positionof the selected record and a previously accessed record.
 4. The methodof claim 1 , wherein step (A) comprises the steps of: (i) reading afirst group of records from non-volatile memory; storing the secondfields associated with the first group of records in a first area in theRAM; and storing the first fields associated with the first group ofrecords in a first buffer; (ii) marking a first end position in RAM ofthe second fields stored in step (i), and storing all remaining un-readrecords in the RAM following the first end position.
 5. The method ofclaim 5 , wherein step (A) further comprises the step of: (iii) markinga second end position in the RAM corresponding to the end position inthe RAM of the remaining un-read records stored in step (ii), and thenstoring a portion of the second array by copying the first buffer intothe RAM following the second end position.
 6. The method of claim 5 ,wherein step (A) further comprises the steps of: (iv) reading, from thefirst end position in the RAM, a further group of records; storing atthe first end position in the RAM the second fields associated with thefurther group of records; and storing the first fields associated withthe further group of records in the first buffer; (v) designating theend position in RAM of the first fields stored in step (iv) as the firstend position, and then moving all remaining records following the firstend position in RAM to the first end position; (vi) designating the endposition in the RAM of the records moved in step (v) as the second endposition and moving the second array to the second end position; (vii)storing a further portion of the second array in RAM by appending thefirst buffer to end of the second array moved in step (vi); and (viii)repeating steps (iv) to (vii) until all records have been processed. 7.A method for storing and accessing a preferred roaming list (PRL) storedin a mobile telephone, the PRL being formed of a plurality of variablesize system records, each of the system records including a systemidentification field, a network identification included field, apreferred_negative field, a geographical region indicator field, and anacquisition parameter information field, each of the system recordsoptionally including a network identification field, a priority field,and a roaming indicator field, comprising the steps of: (A) storing thenetwork identification fields, the priority fields and the roamingindicator fields in the plurality of system records in a first array;storing the system identification fields and the geographical regionindicator fields in the plurality of system records in a second array;storing a first bit of the network identification included fields andthe preferred_negative fields in the plurality of system records in athird array; storing a second bit of the network identification includedfields in the plurality of system records in a fourth array; and storingthe acquisition parameter information fields in the plurality of systemrecords in a fifth array; (B) receiving a first index valuecorresponding to a selected one of the plurality of system records to beaccessed; (C) evaluating, in response to the first index value, entriesin the third array in order to access the first bit of the networkidentification included field and the preferred_negative fieldassociated with the selected system record and in order to determine asecond index value for locating any network identification field,priority field or roaming indicator field associated with the selectedsystem record in the first array; (D) accessing, in response to thesecond index value, any network identification field, priority field orroaming indicator field associated with the selected system record inthe first array; and (E) accessing, in response to the first indexvalue, the system identification field and the geographical regionindicator field associated with the selected system record and stored inthe second array.
 8. The method of claim 7 , further comprising the stepof: (F) accessing, in response to the first index value, the acquisitionparameter information field associated with the selected system recordand stored in the fifth array.
 9. The method of claim 8 , furthercomprising the step of: (G) accessing, in response to the first indexvalue, the second bit of the network identification included fieldassociated with the selected system record and stored in the fourtharray.
 10. The method of claim 7 , wherein step (C) includes the step ofsequentially applying entries in the third array to a lookup table inorder to calculate the second index value.
 11. The method of claim 7 ,wherein the first index value received in step (B) corresponds to anoffset between a position of the selected system record and a previouslyaccessed system record.
 12. The method of claim 7 , wherein step (A)further comprises reading the plurality of system records fromnon-volatile memory in the mobile telephone and storing the plurality ofsystem records in random access memory (RAM) in the mobile telephone.13. The method of claim 12 , wherein the plurality of system records aremanipulated within the RAM during step (A) in order to partition the RAMinto the first, second, third, fourth and fifth arrays.
 14. The methodof claim 13 , wherein step (A) comprises the steps of: (i) reading afirst group of system records from the non-volatile memory; storing thenetwork identification fields, the priority fields and the roamingindicator fields associated with the first group of system records in afirst area in the RAM; storing the system identification fields and thegeographical region indicator fields associated with the first group ofsystem records in a first buffer; storing a first bit of the networkidentification included fields and the preferred_negative fieldsassociated with the first group of system records in a second buffer;storing a second bit of the network identification included fieldsassociated with the first group of system records in a third buffer; andstoring the acquisition parameter information fields associated with thefirst group of system records in a fourth buffer; (ii) marking a firstend position in RAM of the network identification fields, the priorityfields and the roaming indicator fields stored in step (i), reading allremaining un-read system records and storing the remaining un-readsystem records in the RAM following the first end position.
 15. Themethod of claim 14 , wherein step (A) further comprises the step of:(iii) marking a second end position in the RAM corresponding to the endposition in the RAM of the remaining un-read system records stored instep (ii), and then storing a portion of the second array by copying thefirst buffer into the RAM following the second end position.
 16. Themethod of claim 15 , wherein step (A) further comprises the step of:(iv) marking a third end position in the RAM corresponding to the endposition in the RAM of the first buffer stored in step (iii), and thenstoring a portion of the third array by copying the second buffer intothe RAM following the third end position.
 17. The method of claim 16 ,wherein step (A) further comprises the step of: (v) marking a fourth endposition in the RAM corresponding to the end position in the RAM of thesecond buffer stored in step (iv), and then storing a portion of thefourth array by copying the third buffer into the RAM following thefourth end position.
 18. The method of claim 17 , wherein step (A)further comprises the step of: (vi) marking a fifth end position in theRAM corresponding to the end position in the RAM of the third bufferstored in step (v), and then storing a portion of the fifth array bycopying the fourth buffer into the RAM following the fifth end position.19. The method of claim 18 , wherein step (A) further comprises thesteps of: (vii) reading, from the first end position in the RAM, afurther group of system records; storing at the first end position inthe RAM the network identification fields, the priority fields and theroaming indicator fields associated with the further group of systemrecords; storing the system identification fields and the geographicalregion indicator fields associated with the further group of systemrecords in the first buffer; storing a first bit of the networkidentification included fields and the preferred_negative fieldsassociated with the further group of system records in the secondbuffer; storing a second bit of the network identification includedfields associated with the further group of system records in the thirdbuffer; and storing the acquisition parameter information fieldsassociated with the further group of system records in the fourthbuffer; (viii) designating the end position in RAM of the networkidentification fields, the priority fields and the roaming indicatorfields stored in step (vii) as the first end position, and then movingall remaining system records following the first end position in RAM tothe first end position; (ix) designating the end position in the RAM ofthe system records moved in step (viii) as the second end position andmoving the second array to the second end position; (x) storing afurther portion of the second array in RAM by appending the first bufferto the end of the second array moved in step (ix); (xi) designating theend position in the RAM of the second array appended in step (x) as thethird end position and moving the third array to the third end position;(xii) storing a further portion of the third array in RAM by appendingthe second buffer to end of the third array moved in step (xi); (xiii)designating the end position in the RAM of the third array appended instep (xii) as the fourth end position and moving the fourth array to thefourth end position; (xiv) storing a further portion of the fourth arrayin RAM by appending the third buffer to end of the fourth array moved instep (xiii); (xv) designating the end position in the RAM of the fourtharray appended in step (xiv) as the fifth end position and moving thefifth array to the fifth end position; (xvi) storing a further portionof the fifth array in RAM by appending the fourth buffer to end of thefifth array moved in step (xv); (xviii) repeating steps (vii) to (xvi)until all system records have been processed.
 20. A method for storingand accessing a preferred roaming list (PRL) stored in a mobiletelephone, the PRL being formed of a plurality of variable size systemrecords, each of the system records including a system identificationfield, a network identification included field, a preferred_negativefield, a geographical region indicator field, and an acquisitionparameter information field, each of the system records optionallyincluding a network identification field, a priority field, and aroaming indicator field, comprising the steps of: (A) storing thenetwork identification fields, the priority fields and the roamingindicator fields in the plurality of system records in a first array;storing the system identification fields and the geographical regionindicator fields in the plurality of system records in a second array;storing a first bit of the network identification included fields andthe preferred_negative fields in the plurality of system records in athird array; storing a second bit of the network identification includedfields in the plurality of system records in a fourth array; and storingthe acquisition parameter information fields in the plurality of systemrecords in a fifth array; (B) receiving a first index valuecorresponding to a selected one of the plurality of system records to beaccessed; and (C) accessing, in response to the first index value, thesystem identification field associated with the selected system recordand stored in the second array.
 21. An apparatus for storing andaccessing a preferred roaming list (PRL) stored in a mobile telephone,the PRL being formed of a plurality of variable size system records,each of the system records including a system identification field, anetwork identification included field, a preferred_negative field, ageographical region indicator field, and an acquisition parameterinformation field, each of the system records optionally including anetwork identification field, a priority field, and a roaming indicatorfield, comprising: (A) a random access memory that stores the networkidentification fields, the priority fields and the roaming indicatorfields in the plurality of system records in a first array; the randomaccess memory storing the system identification fields and thegeographical region indicator fields in the plurality of system recordsin a second array; the random access memory storing a first bit of thenetwork identification included fields and the preferred_negative fieldsin the plurality of system records in a third array; the random accessmemory storing a second bit of the network identification includedfields in the plurality of system records in a fourth array; and therandom access memory storing the acquisition parameter informationfields in the plurality of system records in a fifth array; and (B) amicroprocessor, coupled to the random access memory, that receives afirst index value corresponding to a selected one of the plurality ofsystem records to be accessed and then evaluates, in response to thefirst index value, entries in the third array in order to access thefirst bit of the network identification included field and thepreferred_negative field associated with the selected system record andin order to determine a second index value for locating any networkidentification field, priority field or roaming indicator fieldassociated with the selected system record in the first array; (C)wherein said microprocessor accesses, in response to the second indexvalue, any network identification field, priority field or roamingindicator field associated with the selected system record in the firstarray; and (D) wherein said microprocessor accesses, in response to thefirst index value, the system identification field and the geographicalregion indicator field associated with the selected system record andstored in the second array.
 22. An apparatus for storing and accessing apreferred roaming list (PRL) stored in a mobile telephone, the PRL beingformed of a plurality of variable size system records, each of thesystem records including a system identification field, a networkidentification included field, a preferred_negative field, ageographical region indicator field, and an acquisition parameterinformation field, each of the system records optionally including anetwork identification field, a priority field, and a roaming indicatorfield, comprising: (A) a random access memory that stores the networkidentification fields, the priority fields and the roaming indicatorfields in the plurality of system records in a first array; the randomaccess memory storing the system identification fields and thegeographical region indicator fields in the plurality of system recordsin a second array; the random access memory storing a first bit of thenetwork identification included fields and the preferred_negative fieldsin the plurality of system records in a third array; the random accessmemory storing a second bit of the network identification includedfields in the plurality of system records in a fourth array; and therandom access memory storing the acquisition parameter informationfields in the plurality of system records in a fifth array; and (B) amicroprocessor, coupled to the random access memory, that receives afirst index value corresponding to a selected one of the plurality ofsystem records to be accessed and then accesses, in response to thefirst index value, the system identification field associated with theselected system record and stored in the second array.